﻿@{
    ViewBag.Title = "ChucNang";
    Layout = "~/Views/Shared/Admin/_AdminLayout.cshtml";
}

@using PagedList
@using PagedList.Mvc
<div style="background: #fff; text-align: right; height: 60px; width: 100%; font-size: 12px; border: 1px solid #ccc;">
    <span style="font-size: 18px; font-weight: bold; float: left; padding-top: 17px;padding-left: 15px;">
        <img src="../../Content/Images/Admin/product.png" />
        PHÂN QUYỀN
    </span>
</div>
    <br />
    <a href="~/AdminUser/ThemPhanQuyen" class="normal blue button input btnThemMoi">Thêm mới</a>
    <input type="submit" value="Xóa đã chọn" class="normal red button input" onclick="return confirm('Bạn có chắc muốn xóa những chức năng đã chọn?')" />
    <br />
    @Html.Raw(@ViewBag.ThongBao)
    <br />
    <table cellspacing="0" rules="rows" class="rows" border="1" style="width: 100%; border-collapse: collapse;">
    <tr class="item_title" style="color: White; background-color: #CCCCCC; font-family: Tahoma; font-size: 12px; font-weight: bold; height: 30px;">
        <th></th>
        <th>ID</th>
        <th>Tên</th>
        <th></th>
    </tr>
    @foreach (var phanquyen in ViewBag.OnePage)
    {
        <tr class="item_row" style="border-color: #F0F0F0; border-style: Solid; height: 40px;">
            <td class="item_float">
                <label>
                    <input type="checkbox" name="deleteInputs" value="@phanquyen.IdQuyen" />
                    <span class="lbl"></span>
                </label>
            </td>
            <td class="item_float">
                <label>
                    @phanquyen.IdQuyen
                </label>
            </td>
            <td class="item_float">
                <label>
                    @phanquyen.TenQuyen
                </label>
            </td>
            <td class="item_float">
                <div class="hidden-phone visible-desktop action-buttons">
                    <a href="~/AdminUser/SuaPhanQuyen/@phanquyen.IdQuyen" class="btnXoa small blue button btnSua">Sửa</a>
                </div>
            </td>
        </tr>
    }
</table>

@Html.PagedListPager((IPagedList)ViewBag.OnePage, page => Url.Action("PhanQuyen", new { page }), PagedListRenderOptions.OnlyShowFivePagesAtATime)
